﻿function PrintElem(elem) {
    Popup($(elem).html());
}
//style="padding: 10px 10px 10px 10px;"
function Popup(data) {
    var mywindow = window.open("", "print", "height=400,width=600");
    mywindow.document.write('<html><head><title>Печать</title>');
    /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
    mywindow.document.write('</head><body>');
    mywindow.document.write(data);
    mywindow.document.write('</body></html>');
    mywindow.document.close();
    mywindow.print();
    //mywindow.close();
    return true;
}